//
//  ObservableDemo.swift
//  demo
//
//  Created by raymond on 2022/5/12.
//

import Foundation

class Contact: ObservableObject {
    @Published var name: String
    @Published var age: Int

    init(name: String, age: Int) {
        self.name = name
        self.age = age
    }

    func haveBirthday() -> Int {
        age += 1
        return age
    }
}



